Alibabacloud.com offers a wide variety of articles about php fatal error cannot redeclare, easily find your php fatal error cannot redeclare information here online.
This article mainly describes the PHP fatal error handling: PHP Fatal Error:cannot redeclare class or function, the need for friends can refer to the following
1. Error type: PHP fatal error
Error type:php Fatal errorFatal Error:cannot Redeclare (a)
In a PHP interactive environment, if you already have such a definition:
function a(){ return 'a';}
Now I find the original is wrong, need to change
function a(){ return 'b'; }
This time will be error, Fatal Error:cannot redeclare
If you
Fatal error: cannot redeclare db_connect () (previusly declared in D:/Wamp/www/flex/New/mysql_inc.php: 7) in D: /Wamp/www/flex/New/mysql_inc.php on line 20
The solution is as follows:
1. is there any include, require, or other file functions
I used php _ autoload to automatically load classes. Today, a good program does not know how to prompt Fatal error: Cannot redeclare class at runtime. It seems that the class is already defined, next I will analyze the solution.
Error Message
Fatal
The solution is as follows:
1. is there any include, require, or other file functions in your source code that contain the definition of the function NW (), and the Code contains NV () so the redeclare (repeated declaration/Definition) error occurs.
I use PHP __autoload State automatic loading class, today good program do not know how to prompt fatal Error:cannot Redeclare class, see is repeating the definition of class, let me analyze the solution.
Error hints
Fatal Error:cannot Redeclare
Fatal error: cannot redeclare is a problem that may be encountered during php Tutorial Development. The reason is that the same name function is repeatedly called,Function mydate ($ format = 'Y-m-d h: I: S', $ timest = 0){Global $ cli_time;$ Addtime
Fatal error:cannot redeclare Htmtocode () (previously declared in D:\www_local\mytest\conn.php:7) in D:\www_local\mytest \conn.php on line 10
This error message appears when you write the paging file page.php
Google Translate this sentence means
PHP common Error handling Fatal error (1) ---- function undefined I. Error type: PHP Fatal error type: PHP Fatal errorFatal Error: Call to undefined function (a) in (B) on line (c) 2. Error Description: This error report indicates that you are
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.